package keyboard.controller.api;

import keyboaUtil.commonUtil.time.DateTime;
import keyboaUtil.userData.MyCookie;
import keyboard.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author 2B键盘
 * @create 2018-05-03 14:06
 * @desc 校验
 **/
@Controller
@RequestMapping("/proving")
public class ProvingAPI {

    @Autowired
    UserService service;

    /**
     * 校验是否登陆
     * @param request
     * @param response
     * @return
     */
    @RequestMapping("/pvLogin.do")
    @ResponseBody
    public void isLogin(HttpServletRequest request,HttpServletResponse response){
        System.out.println(MyCookie.getCookie(request).get(MyCookie.KEYBOARD_IDENTITY)+"在"+ DateTime.nowTime()+"访问了编辑页面!");
    }

}
